package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
* Created by Mybatis Generator on 2023/12/12
*/
@Data
@ApiModel("流水，inventory feed")
@Table(name = "tbl_inventory_feed")
@NoArgsConstructor
@AllArgsConstructor
public class TblInventoryFeed extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;

    @Column(name = "product_id")
    private String productId;

    /**
     * 数量
     */
    @ApiModelProperty("数量")
    private Integer quantity;



    /**
     * 单价
     */
    @Column(name = "cost_price_per_unit")
    @ApiModelProperty("采购单价")
    private BigDecimal costPricePerUnit;

    /**
     * 目前用来存储booking_id
     */
    @Column(name = "object_id")
    @ApiModelProperty("目前用来存储booking_id")
    private String objectId;

    /**
     * 2 -> paid,4 -> manual adjustment, 5 -> write_off(废弃) ,6 -> staff purchase
     */
    @ApiModelProperty("2 -> paid,4 -> manual adjustment, 5 -> write_off(废弃) ,6 -> staff purchase")
    private Integer type;

    @Column(name = "purchase_order_id")
    private String purchaseOrderId;

    @Column(name = "purchase_order_detail_id")
    private String purchaseOrderDetailId;

    /**
     * Available:可用;Total:全部(type为4时必填)
     */
    @Column(name = "adjustment_target")
    @ApiModelProperty("Available:可用;Total:全部(type为4时必填)")
    private String adjustmentTarget;

    @Column(name = "booking_prescription_id")
    private String bookingPrescriptionId;

    /**
     * Type 为 4 时存储格式示例: Adjustment: 123<br>Explanation: 321
     */
    @ApiModelProperty("Type 为 4 时存储格式示例: Adjustment: 123<br>Explanation: 321")
    private String note;
}